home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Information / THINK C Digest / 1990 / 90-07 < prev    next >
Text File  |  1995-12-31  |  33KB  |  1,078 lines

  1. 
  2. Path: ucivax!gateway
  3. From: nagel@ICS.UCI.EDU (Mark Nagel)
  4. Subject: test
  5. Message-ID: <27292.646862862@ics.uci.edu>
  6. Newsgroups: fa.think-c
  7. Reply-To: nagel@ICS.UCI.EDU
  8. Organization: University of California, Irvine - Dept of ICS
  9. Lines: 1
  10. Date: 1 Jul 90 20:10:02 GMT
  11. Phone: (714) 856-5039
  12.  
  13. test of list channel gateway.
  14. 
  15. 
  16. Path: ucivax!gateway
  17. From: nagel@ICS.UCI.EDU (Mark Nagel)
  18. Subject: Archive Information
  19. Message-ID: <1178.646954198@ics.uci.edu>
  20. Newsgroups: fa.think-c
  21. Reply-To: nagel@ICS.UCI.EDU
  22. Organization: University of California, Irvine - Dept of ICS
  23. Lines: 100
  24. Date: 2 Jul 90 21:30:33 GMT
  25. Phone: (714) 856-5039
  26.  
  27. I've decided to a bit of refinement of the archive directory since
  28. it looks as though the types of submissions will be varied enough to
  29. warrant a better organization scheme.  The following is in
  30. /mac/think-c/README.archive:
  31.  
  32. /*****************************************************************************/
  33.  
  34. The archive is organized (currently) as follow:
  35.  
  36. classes
  37.     This contains Think C source code for classes for TC 4.0+.
  38.  
  39. compiler
  40.     This contains files useful for enhancing the Think C
  41.     compiler.  This includes extra include files (like
  42.     prototypes) and upgrades from Symantec.
  43.  
  44. demos
  45.     This contains demo programs.  Since some people are not
  46.     interested in such items, I've decided to separate them all
  47.     out into one subdirectory.
  48.  
  49. examples
  50.     This contains fragments of code that serve as examples, but
  51.     that are not classes.
  52.  
  53. programs
  54.     This contains full source to programs (i.e., compile them
  55.     and they become applications).
  56.  
  57. system
  58.     This contains full source to MacOS system enhancement code
  59.     resources, like CDEFS, MDEFS, etc.
  60.  
  61. /*****************************************************************************/
  62.  
  63. If anyone has any suggestions for better names and/or organizational
  64. tips, please let me know.
  65.  
  66. Here is the current directory of the archive (it's small now, so I
  67. can still do this :-):
  68.  
  69. /mac/think-c:
  70. README.archive
  71. README.submit
  72. classes
  73. compiler
  74. demos
  75. examples
  76. programs
  77. system
  78.  
  79. classes:
  80. DynamicArrays.hqx
  81. DynamicArrays.intro
  82. cdialog.hqx
  83. cdialog.intro
  84. various.hqx
  85. various.intro
  86.  
  87. compiler:
  88. protos-imv.h
  89. protos-imv.intro
  90.  
  91. demos:
  92. Prepare-Demo-1-1.hqx
  93. Prepare-Demo-1-2.hqx
  94. Prepare-Demo.intro
  95.  
  96. examples:
  97. atm-examples.hqx
  98. atm-examples.intro
  99. pap-routines-c.txt
  100. pap-routines-doc.txt
  101. pap-routines-h.txt
  102.  
  103. programs:
  104. GenAPP.hqx
  105. GenAPP.intro
  106. bison.hqx
  107. bison.intro
  108. flex.hqx
  109. flex.intro
  110.  
  111. system:
  112. popupCDEF.hqx
  113. popupCDEF.intro
  114.  
  115. As you can see, I am trying to separate out the headers of the
  116. submissions so that they are available for quick retrieval prior to
  117. full retrieval of the archive file.
  118.  
  119. I have received enough requests for a mail archive server that I am
  120. currently pursuing this.  More when I have found or written one...
  121.  
  122. That's all for now.  There are now about 150 members on this list
  123. with at least 4 exploders.  You shouldn't feel at all shy about
  124. actually using this list if the need arises.
  125.  
  126. Mark
  127. 
  128. 
  129. Path: ucivax!gateway
  130. From: bootsie!olson@ICS.UCI.EDU (Eric Olson)
  131. Subject: Curious TCL bug
  132. Message-ID: <9007030228.AA00430@bootsie.UUCP>
  133. X-Mailer: Mail User's Shell (6.4 2/14/89)
  134. Newsgroups: fa.think-c
  135. Reply-To: olson@endor.harvard.edu
  136. Lines: 41
  137. Date: 3 Jul 90 02:47:19 GMT
  138.  
  139. OK, TCL Hackers!  Here it is: the hardest bug you'll ever want to find!
  140.  
  141. Many, if not all, programs compiled using the Think Class Library exhibit
  142. a very strange behavior:  every once in a while, the program will decide
  143. that the mouse button has been released, even though it has not.  This
  144. behavior presents itself during menu pulls and CMousetask subclasses.
  145. It may also appear in scroll bar thumb drags.
  146.  
  147. An example is drawing a very long squiggly line in Art Class:  eventually,
  148. the line will end, even though the mouse button was not released.
  149.  
  150. It's worth noting that both menu pulls and MouseTasks use the toolbox
  151. function StillDown() to determine if the mouse button has been released.
  152.  
  153. Does anyone know the root of this evil?
  154.  
  155. Some possibilities include:  some event queue filling up (events are
  156. not processed inside the loop of a MouseTask); the ADB bus getting
  157. confused (can someone report as to whether this behavior ever appears
  158. on a (non-ADB) Mac+?); some intentional action on the part of the system
  159. (that I've never heard of?).
  160.  
  161. If you can run Art Class and it never produces this behavior, please
  162. let me know your system configuration in as much detail as possible.
  163. If your system exhibits this behavior to the extreme, please do likewise.
  164.  
  165. Hopefully, we can track this thing down!  It's really starting to annoy me!
  166.  
  167. Regards,
  168.  
  169. Eric
  170.  
  171.  
  172. --
  173. Please note!  olson@bootsie.uucp will not work!  Use an address below:
  174.  
  175. Eric K. Olson                 Internet:   olson@endor.harvard.edu
  176. Lexington Software Design     Usenet:     harvard!endor!olson
  177. 72A Lowell St.                Applelink:  olson@endor.harvard.edu@dasnet#
  178. Lexington, MA  02173          Compuserve: >INTERNET:olson@endor.harvard.edu
  179. (617) 863-9624                Bitnet:     OLSON@HARVARD
  180. 
  181. 
  182. Path: ucivax!gateway
  183. From: eyiskis@polyslo.calpoly.edu (Eric Yiskis)
  184. Subject: Re:  Curious TCL bug
  185. Message-ID: <9007030457.AA18236@polyslo.CalPoly.EDU>
  186. Newsgroups: fa.think-c
  187. Lines: 18
  188. Date: 3 Jul 90 04:57:34 GMT
  189.  
  190.  
  191. >>Many, if not all, programs compiled using the Think Class Library exhibit
  192. >>a very strange behavior:  every once in a while, the program will decide
  193. >>that the mouse button has been released, even though it has not.  This
  194. >>behavior presents itself during menu pulls and CMousetask subclasses.
  195. >>It may also appear in scroll bar thumb drags.
  196.  
  197.  
  198. >>Does anyone know the root of this evil?
  199.  
  200. I too have had this problem, but I attributed it to my mouse ( in that
  201. perhaps the button needs a certain amount of presure even though it is
  202. clicked down.)  So is it software or faulty mouse buttons?  Does it only
  203. happen in Think-C applications or does it happen in the finder too?  I'll
  204. try to observe it more closely...
  205.  
  206. - Eric Yiskis (eyiskis@polyslo.calpoly.edu)
  207.  
  208. 
  209. 
  210. Path: ucivax!gateway
  211. From: gerhard@cs.arizona.edu (Gerhard Mehldau)
  212. Subject: Re: TCL bug
  213. Message-ID: <9007030551.AA09751@megaron.cs.arizona.edu>
  214. Newsgroups: fa.think-c
  215. Lines: 17
  216. Date: 3 Jul 90 05:52:47 GMT
  217.  
  218.  
  219.   I tried mail, but it bounced...
  220.  
  221.   A while back there was a discussion on the net about
  222. this bug appearing in THINK C 3.0, but *only* in the
  223. debugger mode.  I also seem to recall that Rich Siegel
  224. had an answer to this problem (or at least commented
  225. on it), but, unfortunately, I don't recall what is was.
  226.  
  227.   As far as reproducing the bug with THINK C 4.0 goes,
  228. I can't help you; I'm still running 3.0.2 (no TCL), but
  229. I can reproduce it there under the debugger.
  230.  
  231.   Hope this helps.
  232.  
  233. - Gerhard
  234.  
  235. 
  236. 
  237. Path: ucivax!gateway
  238. From: bootsie!olson@ICS.UCI.EDU (Eric Olson)
  239. Subject: That pesky TCL bug
  240. Message-ID: <9007030841.AA01459@bootsie.UUCP>
  241. X-Mailer: Mail User's Shell (6.4 2/14/89)
  242. Newsgroups: fa.think-c
  243. Reply-To: olson@endor.harvard.edu
  244. Lines: 30
  245. Date: 3 Jul 90 08:43:35 GMT
  246.  
  247.  
  248. Well folks, after a few more hours of hacking I have tentatively
  249. decided that:
  250.  
  251. - The failure occurs somewhere inside StillDown().  Replacing StillDown()
  252. with Button() (which is essentially the same, but a less reliable test
  253. of whether the button has been depressed all along) inside a CMouseTask
  254. eliminates the behavior.
  255.  
  256. - In the normal scheme of things, StillDown() will return TRUE until
  257. a PostEvent() with a mouseUp event code is executed.  When the failure
  258. occurs, PostEvent(mouseUp) is not called until the mouse button actually
  259. _is_ released-- yet StillDown() has already returned FALSE!
  260.  
  261. - The problem is not related to the TCL growZoneFunc.
  262.  
  263. Sorry if my descriptions aren't too cogent right now.  It's late.
  264. Any hints or guesses will be appreciated!
  265.  
  266. -Eric
  267.  
  268.  
  269. --
  270. Please note!  olson@bootsie.uucp will not work!  Use an address below:
  271.  
  272. Eric K. Olson                 Internet:   olson@endor.harvard.edu
  273. Lexington Software Design     Usenet:     harvard!endor!olson
  274. 72A Lowell St.                Applelink:  olson@endor.harvard.edu@dasnet#
  275. Lexington, MA  02173          Compuserve: >INTERNET:olson@endor.harvard.edu
  276. (617) 863-9624                Bitnet:     OLSON@HARVARD
  277. 
  278. 
  279. Path: ucivax!gateway
  280. From: bootsie!olson@ICS.UCI.EDU (Eric Olson)
  281. Subject: That TCL bug, part III
  282. Message-ID: <9007030924.AA01506@bootsie.UUCP>
  283. X-Mailer: Mail User's Shell (6.4 2/14/89)
  284. Newsgroups: fa.think-c
  285. Reply-To: olson@endor.harvard.edu
  286. Lines: 23
  287. Date: 3 Jul 90 09:44:13 GMT
  288.  
  289.  
  290. As Gerhard Mehldau has pointed out, this bug seems to only appear
  291. when running the source debugger.  I can not get it to happen in
  292. a compiled down application or if the source debugger is not running
  293. in the project.
  294.  
  295. I'll call the people at Symantec and report back to y'all.
  296.  
  297. Thank goodness all our applications won't exhibit this behavior!
  298.  
  299. Regards,
  300.  
  301. -Eric
  302.  
  303.  
  304. --
  305. Please note!  olson@bootsie.uucp will not work!  Use an address below:
  306.  
  307. Eric K. Olson                 Internet:   olson@endor.harvard.edu
  308. Lexington Software Design     Usenet:     harvard!endor!olson
  309. 72A Lowell St.                Applelink:  olson@endor.harvard.edu@dasnet#
  310. Lexington, MA  02173          Compuserve: >INTERNET:olson@endor.harvard.edu
  311. (617) 863-9624                Bitnet:     OLSON@HARVARD
  312. 
  313. 
  314. Path: ucivax!gateway
  315. From: purcell@sciences.sdsu.edu
  316. Subject: The cdev class and ModalDialog()
  317. Message-ID: <9007031803.AA02551@sciences.sdsu.edu>
  318. Newsgroups: fa.think-c
  319. Lines: 38
  320. Date: 3 Jul 90 18:03:07 GMT
  321.  
  322.  
  323.     Please respond to the following via email to keep clutter from this mailing
  324. list.  Thanks.
  325.  
  326.     I am writing a cdev using the THINK C cdev class.  It allows users to enter
  327. config info for an INIT into editText fields & saves them in the resource
  328. file.  If the user has entered invalid data and tries to close the cdev, I
  329. want to display an error dialog & close with the "cdevGenErr".  I am trying to
  330. use ModalDialog() on the error dialog window, but a nulDev message is
  331. generated in the process, which causes a second call to Close() (a "sequence
  332. of events" follows).  This hopelessly confuses the CP.  How do I (or even can
  333. I) use ModalDialog() with the cdev class?
  334.  
  335. What I want to happen:
  336.     1) user enters bad info & selects close (either closebox or other cdev)
  337.     2) closeDev message sent to Message() -- sets status = 0 & calls custom
  338. Close()
  339.     3) Close() checks for bad data -- if good, saves; if bad, shows dialog &
  340. calls ModalDialog() then DisposDialog()
  341.     4) normal Close() -- deallocates the cdev
  342.     5) CP greys out cdev area
  343.  
  344. What actually happens:
  345.     1) same as above
  346.     2) same
  347.     3) Close() checks for bad data -- if good, saves; if bad, shows dialog &
  348. calls ModalDialog()
  349.     4) a nulDev now gets sent to Message() -- calls Idle() & then Close() (status
  350. set to 0 in #2, so if-then still true)
  351.     5) Close() checks data, shows dialog & calls ModalDialog() then
  352. DisposDialog() -- no nulDev this time!
  353.     6) normal Close() -- deallocates the cdev
  354.     7) CP confused -- cdev deallocated, but call to ModalDialog() still "on the
  355. books" -- waits for mouse click & crashes
  356.  
  357. Please respond to:
  358. Guy (purcell@zeus.sdsu.edu)
  359.  
  360. 
  361. 
  362. Path: ucivax!gateway
  363. From: bootsie!olson@ICS.UCI.EDU (Eric Olson)
  364. Subject: That Bug
  365. Message-ID: <9007031821.AA02174@bootsie.UUCP>
  366. X-Mailer: Mail User's Shell (6.4 2/14/89)
  367. Newsgroups: fa.think-c
  368. Reply-To: olson@endor.harvard.edu
  369. Lines: 16
  370. Date: 3 Jul 90 20:12:59 GMT
  371. MMDF-Warning: Unable to confirm address in preceding line at ICS.UCI.EDU
  372.  
  373.  
  374. I called Symantec today to tell them everything I knew.  Rich Siegel is
  375. on vacation right now, so I wasn't able to get his insight, but the
  376. information that I've posted to this list has been duly logged and noted.
  377.  
  378. -Eric
  379.  
  380.  
  381. --
  382. Please note!  olson@bootsie.uucp will not work!  Use an address below:
  383.  
  384. Eric K. Olson                 Internet:   olson@endor.harvard.edu
  385. Lexington Software Design     Usenet:     harvard!endor!olson
  386. 72A Lowell St.                Applelink:  olson@endor.harvard.edu@dasnet#
  387. Lexington, MA  02173          Compuserve: >INTERNET:olson@endor.harvard.edu
  388. (617) 863-9624                Bitnet:     OLSON@HARVARD
  389. 
  390. 
  391. Path: ucivax!gateway
  392. From: rlw@cs.princeton.edu (Robert Wald)
  393. Subject: (none)
  394. Message-ID: <9007041223.AA12634@cs.Princeton.EDU>
  395. Newsgroups: fa.think-c
  396. Lines: 15
  397. Date: 4 Jul 90 12:25:18 GMT
  398.  
  399.   I'm about to do some Mac programming after a few years absence, and
  400. was either going to do it in TCL or MacApp. Last time I used MacApp was
  401. in its beta release, so I was wondering if anyone has compared it to
  402. the TCL library and can send me some info on how TCL compares with
  403. MacApp 2.0 and the forthcoming 3.0. Which is easier to use, more complete.
  404. Actually, I assume that MacApp is better, but how much good
  405. functionality does TCL provide
  406. ?
  407. Thanks.
  408.  
  409. TO respond directly, please send to rlwald@phoenix.princeton.edu, not
  410. to the address this came from. Thanks
  411.  
  412. -Rob
  413.  
  414. 
  415. 
  416. Path: ucivax!gateway
  417. From: jg@Eng.Sun.COM ("Jerry Gilliam (Server Drivers")
  418. Subject: Think C qsort
  419. Message-ID: <9007051657.AA02329@tethys.Eng.Sun.COM>
  420. Newsgroups: fa.think-c
  421. Lines: 10
  422. Date: 5 Jul 90 17:00:00 GMT
  423. MMDF-Warning: Parse error in original version of preceding line at ICS.UCI.EDU
  424.  
  425. I recently had occasion to use the qsort function packaged with
  426. Think C 4.0, and it appears to be buggy.  The resulting data
  427. was only partially sorted.  Large chunks of the data were sorted,
  428. but there was still very gross disorder.  I tried writing a
  429. simple bubble sort, using the same interface, and that seems
  430. to have worked fine.  This leads me to believe that this qsort
  431. routine may have some problems.  Has anyone else had any
  432. problems of this sort?  (No pun intended)
  433.  
  434. Jerry Gilliam
  435. 
  436. 
  437. Path: ucivax!gateway
  438. From: che@media-lab.media.mit.edu
  439. Subject: GenApp
  440. Message-ID: <9007051917.AA11682@media-lab.media.mit.edu>
  441. Newsgroups: fa.think-c
  442. Lines: 7
  443. Date: 5 Jul 90 19:17:01 GMT
  444.  
  445. Has anybody else had trouble with this? I've followed the
  446. instructions on the readme file, but still get some compile errors.
  447. When compiling AboutBox.c, I get an error saying "call of 'PtoCstr'
  448.  does not match prototype".
  449. Anyone else had this happen to them?
  450.  
  451. Natalio
  452. 
  453. 
  454. Path: ucivax!gateway
  455. From: bosborne@gn.ecn.purdue.edu (Bradley A Osborne)
  456. Subject: MacinTalk
  457. Message-ID: <9007062201.AA04033@gn.ecn.purdue.edu>
  458. Newsgroups: fa.think-c
  459. Lines: 9
  460. Date: 6 Jul 90 22:03:33 GMT
  461.  
  462.  
  463. Hello!
  464.  
  465. I know that MacinTalk is supposed to be phased out with system 7, but
  466. I am interested in playing around with it.  Does anyone have the interface
  467. libraries/routines for use with THC?
  468.  
  469. Thanks.
  470.  
  471. 
  472. 
  473. Path: ucivax!gateway
  474. From: che@media-lab.media.mit.edu
  475. Subject: GenAPP Problem
  476. Message-ID: <9007062215.AA23269@media-lab.media.mit.edu>
  477. Newsgroups: fa.think-c
  478. Lines: 6
  479. Date: 6 Jul 90 22:13:46 GMT
  480.  
  481. I want to thank everyone for their help. I got 6 responses within
  482. the day! I'm very grateful! I needed to cast the string...
  483. Keep it up! This is very helpfull to those of us starting on Mac
  484. programming!
  485.  
  486. Natalio
  487. 
  488. 
  489. Path: ucivax!gateway
  490. From: bosborne@gn.ecn.purdue.edu (Bradley A Osborne)
  491. Subject: MacinTalk Interfaces
  492. Message-ID: <9007080210.AA07605@gn.ecn.purdue.edu>
  493. Newsgroups: fa.think-c
  494. Lines: 8
  495. Date: 8 Jul 90 02:13:15 GMT
  496.  
  497.  
  498. Thanks to those of you who helped me find the THC interfaces
  499. for MacinTalk.  I will post the files to the archive soon (which
  500. means as soon as I can UL them without any problems).  Keep up the
  501. good responses on this list!
  502.  
  503. Thanks.
  504.  
  505. 
  506. 
  507. Path: ucivax!gateway
  508. From: zaccone@sol.bucknell.edu (Rick Zaccone)
  509. Subject: CDialog 1.2
  510. Message-ID: <9007080957.AA14279@rigel.bucknell.edu>
  511. Newsgroups: fa.think-c
  512. Lines: 13
  513. Date: 8 Jul 90 10:46:13 GMT
  514.  
  515. I recently got a copy of CDialog 1.1 from the sumex-aim archives.
  516. This is a class library for modeless dialogs.  It doesn't compile with
  517. TC 4.0.2.  The author claims that version 1.2 corrects this problem,
  518. and he has made it available through CompuServe.  Does anyone have a
  519. copy of this that s/he is willing to share?
  520.  
  521. Perhaps even more important, does anyone have an example of how to use
  522. CDialog?  I found the explanation that came with CDialog to be
  523. lacking.
  524.  
  525. Rick Zaccone
  526. zaccone@sol.bucknell.edu
  527.  
  528. 
  529. 
  530. Path: ucivax!gateway
  531. From: nagel@ICS.UCI.EDU (Mark Nagel)
  532. Subject: ARCHIVE: Macintalk Interface
  533. Message-ID: <9536.647453603@ics.uci.edu>
  534. Newsgroups: fa.think-c
  535. Reply-To: nagel@ICS.UCI.EDU
  536. Organization: University of California, Irvine - Dept of ICS
  537. Lines: 24
  538. Date: 8 Jul 90 16:16:31 GMT
  539. Phone: (714) 856-5039
  540.  
  541. [Administrative note: From this message on, I will preface archive
  542.  addition messages with ARCHIVE: for easier recognition.  Also, to
  543.  all those out there who want email access to the archive, it should
  544.  be available within the week -- I'm looking at two different
  545.  packages and will decide on one Real Soon Now.]
  546.  
  547. Date: Sun, 8 Jul 90 09:34:28 -0500
  548. From: Bradley A Osborne <bosborne@gn.ecn.purdue.EDU>
  549.  
  550. This file contains the libraries and header files which are
  551. needed to use the MacinTalk speech driver from Think C.
  552. (MacinTalk is available from rascal.ics.uci.edu in
  553. mac/system-related).  The archive also contains an example program.
  554.  
  555. BTW#1:  I did not create these files, but downloaded them from
  556. COMPU$$$ERVE.
  557.  
  558. BTW#2:  Apple has made it abundantly clear that MacinTalk will
  559. NOT be supported in System 7, so don't plan on writing any really
  560. serious applications using this stuff.
  561.  
  562. Thanks to the folks who responded to my posting requesting these files.
  563.  
  564. [saved as: /mac/think-c/compiler/macintalk-interface.hqx]
  565. 
  566. 
  567. Path: ucivax!gateway
  568. From: ephraim@Think.COM
  569. Subject: What's osEvt's value?
  570. Message-ID: <9007091930.AA01539@kulla.think.com>
  571. Newsgroups: fa.think-c
  572. Lines: 8
  573. Date: 9 Jul 90 19:31:36 GMT
  574.  
  575.  
  576. I'm trying to port the user interface code for Disinfectant 2.0
  577. to Think C 4.02.  Things are going pretty well, but there's one
  578. thing I can't find in Inside Mac, SpInside Mac, or the Tech Notes:
  579.  
  580. What's the actual value of the constant osEvt?  Is it 9, which
  581. is marked as "no longer used?"  Where is it documented?  What
  582. does it mean?
  583. 
  584. 
  585. Path: ucivax!gateway
  586. From: ephraim@Think.COM
  587. Subject: osEvt - the hidden truth
  588. Message-ID: <9007092011.AA01739@kulla.think.com>
  589. Newsgroups: fa.think-c
  590. Lines: 9
  591. Date: 9 Jul 90 20:11:51 GMT
  592.  
  593.  
  594. OK, Think C does know about osEvt, suspendResumeMessage, and related
  595. stuff.  Where?  Just read CSwitchboard.c.  osEvt isn't mentioned by
  596. name, but app4Evt is taken as the bearer of suspend/resume messages.
  597. Other useful constants (suspendResumeMessage, ResumeEvtMask) are
  598. locally defined in CSwitchboard.
  599.  
  600. I've sent a mild reproof to siegel@harvard.harvard.edu, so perhaps
  601. this stupidity will be remedied in a future release.
  602. 
  603. 
  604. Path: ucivax!gateway
  605. From: paul@surf.sics.bu.oz.au (Paul Davis)
  606. Subject: dialogs
  607. Message-ID: <9007120207.26736@munnari.oz.au>
  608. Newsgroups: fa.think-c
  609. Lines: 24
  610. Date: 12 Jul 90 02:11:13 GMT
  611.  
  612. Is this the THINK C forum?  I got this address from the Internet
  613. a while back...
  614.  
  615. My query: I am using TC4 for a small application and have gotten
  616. around to wanting to add some configuration dialogs.  These are
  617. modal, and contain only standard dialog items (checkbox, radio
  618. buttons, and std. buttons; maybe someday a popup or two).  My
  619. question is, are people out there using TCL using the standard
  620. dialog manager for dialogs, or creating a TCL CDirector etc.
  621. If standard dialogs, does someone have some neat routines for
  622. a CDialogMgr object to interface to the toolbox manager?  If
  623. using TCL for all button objects etc., what are you overriding
  624. to disable menus clicks, other windows etc.; the CDeskTop?
  625.  
  626. Quids pro: I have created a GridPanel subclass to CScrollPane
  627. which implements a set of panes such that they behave as a
  628. spreadsheet does when you 'freeze titles', ie. the top pane
  629. scrolls horizontally with the main pane, the left pane scrolls
  630. vertically with the main pane, and the upper left corner just
  631. sits there.  Any interest?
  632.  
  633. Replies to: paul@surf.sics.bu.oz.au
  634.  
  635. Paul Davis, School of Business, Bond University, Australia
  636. 
  637. 
  638. Path: ucivax!gateway
  639. From: nagel@ICS.UCI.EDU (Mark Nagel)
  640. Subject: ARCHIVE: Think C Marker
  641. Message-ID: <4488.647903047@ics.uci.edu>
  642. Newsgroups: fa.think-c
  643. Reply-To: nagel@ICS.UCI.EDU
  644. Organization: University of California, Irvine - Dept of ICS
  645. Lines: 25
  646. Date: 13 Jul 90 21:05:25 GMT
  647. Phone: (714) 856-5039
  648.  
  649. I am posting the attached for a friend.  It's a neat hack that gives the
  650. Think C (4.0.x) editor a "mark" facility.  It provides a menu of all the
  651. procedures and methods in your src files.  Selecting an item in the menu
  652. causes the editor to jump to the start of that routine.  You can also
  653. define your own place marks.
  654.  
  655. When you unstuff the file, you will find an installer application.  Run
  656. it, and tell the installer where your copy of TC is (backup first!).
  657. Click on "Help" for full details.
  658.  
  659. Shareware.  If you like it, write to Symantec and tell them to include
  660. it in the next version of Think C.
  661.  
  662. I was a beta-tester, but have no other connections with the product.
  663.  
  664. Sak Wathanasin
  665. Network Analysis Limited
  666.  
  667. uucp:    ...!ukc!nan!sw
  668. other:    sw@network-analysis-ltd.co.uk
  669. phone:  (+44) 203 419996
  670. telex:  9312130355 (SW G)
  671. snail:  178 Wainbody Ave South, Coventry CV3 6BX, UK
  672.  
  673. [saved as: /mac/think-c/compiler/marker.hqx]
  674. 
  675. 
  676. Path: ucivax!gateway
  677. From: houpt@svax.cs.cornell.edu ("Charles E. Houpt")
  678. Subject: problem with conditional expressions that return structures
  679. Message-ID: <9007150409.AA18300@svax.cs.cornell.edu>
  680. Newsgroups: fa.think-c
  681. Lines: 30
  682. Date: 15 Jul 90 06:41:14 GMT
  683.  
  684. The Think C compiler flags an error when you try to make a conditional
  685. expression return a structure. The compiler says its an "illegal operation
  686. on struct/union". Here's an example:
  687.  
  688. struct point {
  689.     int x;
  690.     int y;
  691. };
  692.  
  693. struct point ok_max_x(a,b)
  694. struct point a,b;
  695. {
  696.     if (a.x>b.x) return a;
  697.     else return b;
  698. }
  699.  
  700. struct point error_max_x(a,b)
  701. struct point a,b;
  702. {
  703. /* Think C: Illegal operation on struct/union */
  704.     return (a.x>b.x) ? a : b;
  705. }
  706.  
  707. The 2nd edition K&R seems to say it should be legal (Appedix A7.16).
  708. And the BSD and Sun compilers accept this code.
  709.  
  710. Is this a bug in Think C?
  711.  
  712. Thanks, Chuck Houpt.
  713. houpt@svax.cs.cornell.edu
  714. 
  715. 
  716. Path: ucivax!gateway
  717. From: resnick@kant.cogsci.uiuc.edu (Pete Resnick)
  718. Subject: Pointer problems
  719. Message-ID: <9007160011.AA03678@kant.cogsci.uiuc.edu>
  720. X-Mailer: ELM [version 2.2 PL0]
  721. Newsgroups: fa.think-c
  722. Lines: 39
  723. Date: 16 Jul 90 00:15:16 GMT
  724.  
  725. OK, I'm baffled. The one reason I liked to program in Pascal was
  726. because I understood pointers when I programmed in Pascal. Now, in C,
  727. I no longer do.
  728.  
  729. This piece of code gives me the compile time error "pointer required"
  730. in THINK C on the line that says "errCode = ...". What I am trying to
  731. do is pass the address of the fourth byte as the first parameter and
  732. the contents of the third byte as the third parameter.
  733.  
  734. #define FIRST_STRING_OFFSET    2
  735. #define FULL_NAME_INDEX     1
  736. #define NUM_OF_STRINGS        5
  737. #define STRL_RSRC        'STR#'
  738. #define USER_NAMES_STRL_ID    128
  739.  
  740. main()
  741. {
  742. Handle NamesList;
  743. StringHandle SomeStrings[NUM_OF_STRINGS];
  744. OSErr errCode;
  745.  
  746. NamesList = Get1Resource(STRL_RSRC, USER_NAMES_STRL_ID);
  747. errCode = PtrToHand(&(**NamesList)[FIRST_STRING_OFFSET + 1],
  748.                     SomeStrings[FULL_NAME_INDEX],
  749.                     (**NamesList)[FIRST_STRING_OFFSET]);
  750. }
  751.  
  752. What am I doing wrong, or more to the point, what do I do to make this
  753. work? I am missing something obvious. There is also probably a much
  754. niftier way to do this that I can't figure out, and I would be partial
  755. to getting some hints.
  756.  
  757. pr
  758. --
  759. Pete Resnick             (...so what is a mojo, and why would one be rising?)
  760. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  761. System manager - Cognitive Science Group, Beckman Institute, UIUC
  762. Internet/ARPAnet/EDUnet  : resnick@kant.cogsci.uiuc.edu
  763. BITNET (if no other way) : FREE0285@UIUCVMD
  764. 
  765. 
  766. Path: ucivax!gateway
  767. From: nagel@wintermute.ICS.UCI.EDU (Mark Nagel)
  768. Subject: archive mail server info
  769. Message-ID: <5000.648144564@wintermute.ics.uci.edu>
  770. Newsgroups: fa.think-c
  771. Reply-To: nagel@ICS.UCI.EDU
  772. Organization: University of California, Irvine - Dept of ICS
  773. Lines: 20
  774. Date: 16 Jul 90 16:08:57 GMT
  775. Phone: (714) 856-5039
  776.  
  777. OK everyone, I have installed an archive server on ics.uci.edu.  I
  778. was going to write my own and thus be sure of it, but I have other
  779. more important projects pending, so I snagged the source to the
  780. Clarkson archive server.  After tweaking it a bit, I managed to get
  781. it functioning.  So, please give it a try and let me know if you
  782. encounter any problems.  The server accepts various commands, most
  783. of which use a "standard" syntax.  To begin, send a message to:
  784.  
  785.     archive-server@ics.uci.edu
  786.  
  787. with a Subject: of help.  This will send you a copy of the help file
  788. for using the server.  To get a file from the think-c archive, you
  789. should send a message with a Subject: of (for example):
  790.  
  791.     send mac/think-c/compiler marker.hqx
  792.  
  793. If you need it, use it, and once again, please let me know if you
  794. have problems.
  795.  
  796. Mark
  797. 
  798. 
  799. Path: ucivax!gateway
  800. From: zaccone@sol.bucknell.edu (Rick Zaccone)
  801. Subject: CDialog 1.2 (again)
  802. Message-ID: <9007170918.AA01200@rigel.bucknell.edu>
  803. Newsgroups: fa.think-c
  804. Lines: 10
  805. Date: 17 Jul 90 09:14:09 GMT
  806.  
  807. A couple of weeks ago I sent a message asking if anyone had a copy of
  808. CDialog 1.2.  Several people responded that they too would like to get
  809. a copy.  However, no one actually came through with a copy.  The
  810. author claims that version 1.2 exists.  Is there anyone who can at
  811. least give me a pointer as to where I might find it?  (I've written to
  812. the author, but he doesn't seem to be answering his mail).
  813.  
  814. Rick Zaccone
  815. zaccone@sol.bucknell.edu
  816. zaccone@bknlvms.bitnet
  817. 
  818. 
  819. Path: ucivax!gateway
  820. From: nagel@esp.ICS.UCI.EDU (Mark Nagel)
  821. Subject: ARCHIVE: cdialog 1.2
  822. Message-ID: <2424.648348481@esp.ics.uci.edu>
  823. Newsgroups: fa.think-c
  824. Reply-To: nagel@ICS.UCI.EDU
  825. Organization: University of California, Irvine - Dept of ICS
  826. Lines: 6
  827. Date: 19 Jul 90 00:51:54 GMT
  828. Phone: (714) 856-5039
  829.  
  830. Rick Zaccone sent in the newest version of the CDialog class,
  831. version 1.2.
  832.  
  833. Mark
  834.  
  835. [saved as: mac/think-c/classes/cdialog-12.hqx]
  836. 
  837. 
  838. Path: ucivax!gateway
  839. From: dte@cs.rit.edu (Emlen Dave T)
  840. Subject: bitmap printing questions
  841. Message-ID: <9007202102.AA01920@kansas.rit.edu>
  842. Newsgroups: fa.think-c
  843. Lines: 55
  844. Date: 20 Jul 90 21:03:48 GMT
  845.  
  846.  
  847. I'm writing a quick 'n' dirty program to dump a bitmap to a printer.  Here's
  848. my print code:
  849.  
  850. >extern  BitMap  my_bitmap;
  851. >static  THPrint hPrint = nil;
  852. >
  853. >CheckPrintHandle()
  854. >{
  855. >    if (hPrint==nil)
  856. >        PrintDefault(hPrint = (TPrint **) NewHandle( sizeof( TPrint )));
  857. >}
  858. >
  859. >
  860. >DoPrint()
  861. >{
  862. >TPPrPort        printPort;
  863. >GrafPtr         savePort;
  864. >TPrStatus       prStatus;
  865. >
  866. >    PrOpen();
  867. >    CheckPrintHandle();
  868. >    if (PrJobDialog(hPrint) != 0)
  869. >        {
  870. >            GetPort(&savePort);
  871. >            printPort = PrOpenDoc(hPrint, 0L, 0L);
  872. >            SetPort(printPort);
  873. >            PrOpenPage(printPort, 0L);
  874. >            PrCtlCall(iPrBitsCtl, &my_bitmap, &(my_bitmap.bounds), lPaintBits);
  875. >            PrClosePage(printPort);
  876. >            PrCloseDoc(printPort);
  877. >            PrPicFile(hPrint, 0L, 0L, 0L, &prStatus);
  878. >            SetPort(savePort);
  879. >        }
  880. >    PrClose();
  881. >}
  882.  
  883. This prints out on the LaserWriter at 72 dpi (it makes no difference if I
  884. change lPaintBits to lScreenBits).  How do I get the bitmap to be printed
  885. at > 72 dpi (e.g. 300 dpi)?
  886.  
  887. The reason that I'm writing this is so I can have an easy way to send an
  888. image scanned in at 200 dpi to a DoveFax modem, which looks like a 200 dpi
  889. printer to applications.
  890.  
  891. This brings me to my second question.  The above code prints fine to a
  892. LaserWriter (aside from being 72 dpi), but when I select the DoveFax modem
  893. in the chooser and try to print, I get a -17 printing error from the
  894. print driver.  I believe -17 means "Driver can't respond to Control call."
  895. What control call could it be referring to?
  896.  
  897. Thanks in advance.
  898.  
  899. -Dave Emlen
  900. dte@cs.rit.edu
  901. 
  902. 
  903. Path: ucivax!gateway
  904. From: spencer@zip.eecs.umich.edu
  905. Subject: bitmap printing questions
  906. Message-ID: <9007230309.AA18979@spline.eecs.umich.edu>
  907. In-Reply-To: <9007202102.AA01920@kansas.rit.edu>
  908. Newsgroups: fa.think-c
  909. Lines: 75
  910. Date: 23 Jul 90 03:10:20 GMT
  911.  
  912. Your problem could be The iPrBitsCtl call.  You may have to use
  913. CopyBits to print to your fax modem.
  914.  
  915. I enclose some code I used to print to my LW II SC at 300 dpi.
  916. The application this came from drew figures with Quickdraw, but The
  917. printing wrapper code came from an app (to which I have since lost The
  918. sources) that printed bitmaps at 300dpi.  The important thing is the
  919. PrGeneral/setRslOp call.  Otherwise, you will print at 72dpi.
  920.  
  921.  
  922. do_print()
  923. {
  924.     TPPrPort pr_port;
  925.     int scale, hscale, vscale, save_scale;
  926.     Point origin, maxpt, save_origin;
  927.     int i;
  928.     TPrStatus st_rec;
  929.     TGetRslBlk grsl;
  930.     TSetRslBlk srsl;
  931.     int resl;
  932.  
  933.     /* Some application specific stuff was here. */
  934.  
  935.     if ( !printer_is_open )
  936.         do_page_setup();
  937.     if ( !printer_is_open )
  938.         return;        /* if error */
  939.  
  940.     if ( !PrJobDialog( hPrint ) )
  941.         return;
  942.  
  943.     /* Set printer to best resolution */
  944.     grsl.iOpCode = getRslDataOp;
  945.     PrGeneral( &grsl );
  946.     resl = 0;
  947.     if ( grsl.iError == noErr )
  948.     {
  949.         for ( i = 0; i < grsl.iRslRecCnt; i++ )
  950.             if ( grsl.rgRslRec[i].iXRsl == grsl.rgRslRec[i].iYRsl &&
  951.                  grsl.rgRslRec[i].iXRsl > resl )
  952.                 resl = grsl.rgRslRec[i].iXRsl;
  953.         if ( resl != 0 )
  954.         {
  955.             srsl.iOpCode = setRslOp;
  956.             srsl.hPrint = hPrint;
  957.             srsl.iXRsl = resl;
  958.             srsl.iYRsl = resl;
  959.             PrGeneral( &srsl );
  960.         }
  961.     }
  962.  
  963.     /* More application specific stuff to determine appropriate
  964.      * scaling to print at this resolution was here.
  965.      */
  966.  
  967.     pr_port = PrOpenDoc( hPrint, nil, nil );
  968.     if ( PrError() == noErr )
  969.     {
  970.         PrOpenPage( pr_port, nil );
  971.         if ( PrError() == noErr )
  972.         {
  973.             /* Actually print by drawing. */
  974.         }
  975.         PrClosePage( pr_port );
  976.     }
  977.     PrCloseDoc( pr_port );
  978.  
  979.     if ( (*hPrint)->prJob.bJDocLoop == bSpoolLoop && PrError() == noErr )
  980.         PrPicFile( hPrint, nil, nil, nil, &st_rec );
  981.     if ( PrError() != noErr )
  982.         SysBeep( 2 );
  983. }
  984.  
  985. =Spencer W. Thomas         EECS Dept, U of Michigan, Ann Arbor, MI 48109
  986. spencer@eecs.umich.edu        313-936-2616 (8-6 E[SD]T M-F)
  987. 
  988. 
  989. Path: ucivax!gateway
  990. From: leeke@osage.csc.ti.COM
  991. Subject: C++
  992. Message-ID: <9007231854.AA00346@osage.csc.ti.com>
  993. Newsgroups: fa.think-c
  994. Lines: 23
  995. Date: 23 Jul 90 20:01:03 GMT
  996.  
  997. Does anyone know if there is a full C++ (2.x) implementation
  998. planned for a future version of THINK C?  If so, are there also
  999. plans for THINK C to then stay current with AT&T C++ including
  1000. parameterized types and error handling?
  1001.  
  1002. While error handling is valuable, from a programming productivity
  1003. and code-reusability perspective, I am really looking forward to
  1004. parameterized types.
  1005.  
  1006. Thanks,
  1007.  
  1008. Steve Leeke
  1009.  
  1010. leeke@csc.ti.com
  1011.  
  1012. (214) 995-0397
  1013.  
  1014. Computer Science Center
  1015. Texas Instruments, Inc.
  1016. MS 238
  1017. P.O. Box 655474
  1018. Dallas, TX 75265
  1019.  
  1020. 
  1021. 
  1022. Path: ucivax!gateway
  1023. From: bosborne@gn.ecn.purdue.edu (Bradley A Osborne)
  1024. Subject: Pyro!
  1025. Message-ID: <9007250035.AA09911@gn.ecn.purdue.edu>
  1026. Newsgroups: fa.think-c
  1027. Lines: 9
  1028. Date: 25 Jul 90 00:38:41 GMT
  1029.  
  1030.  
  1031. There has been some interest expressed here in writing Pyro! modules using
  1032. Think C.  If someone can convince me that the people at Pyro! (i forget
  1033. the name of the company) would not mind my doing so, I will post the
  1034. development guide, header files, and sample projects for Think C to the
  1035. archive (I must be sure that no Copyright laws would be violated)
  1036.  
  1037. BTW:  I have not purchased Pyro!, but my roomate has.
  1038.  
  1039. 
  1040. 
  1041. Path: ucivax!gateway
  1042. From: jxf@orion.cis.ksu.edu (Jerry Frain)
  1043. Subject: Re: C++
  1044. Message-ID: <9007251305.AA25294@orion.cis.ksu.edu>
  1045. In-Reply-To: <9007231854.AA00346@osage.csc.ti.com>; from "leeke@osage.csc.ti.COM" at Jul 23, 90 8:01 pm
  1046. X-Mailer: ELM [version 2.3 PL5]
  1047. Newsgroups: fa.think-c
  1048. Lines: 26
  1049. Date: 25 Jul 90 13:06:46 GMT
  1050.  
  1051. >
  1052. > Does anyone know if there is a full C++ (2.x) implementation
  1053. > planned for a future version of THINK C?  If so, are there also
  1054. > plans for THINK C to then stay current with AT&T C++ including
  1055. > parameterized types and error handling?
  1056. >
  1057. > While error handling is valuable, from a programming productivity
  1058. > and code-reusability perspective, I am really looking forward to
  1059. > parameterized types.
  1060.  
  1061. Wow.  This man reads my mind.
  1062.  
  1063. A while back I posted an article to comp.sys.mac.programmer complaining
  1064. that the THINK C OOP really doesn't hold a candle to C++.  I find things
  1065. like redefining operators a must.
  1066.  
  1067. Someone else followed up my article, and pleaded for someone (he hinted
  1068. to Rich Siegel, a Symantec staff software developer) to at least hint
  1069. at what Symantec had in mind for the future of THINK C.
  1070.  
  1071. Rich replied to his article, and let us know that he's not saying anything.
  1072.  
  1073. THINK by far is the best C compiler out there for the Mac, but I wish
  1074. they would bring it up to a full C++ implementation
  1075.  
  1076.   --Jerry
  1077. 
  1078.